<?php
$id=$_GET['id'];
$con = mysqli_connect('localhost', 'root', 'root');
if (!$con) {
    die('连接失败') . mysqli_connect_error();
}
mysqli_select_db($con, 'blog');
mysqli_set_charset($con, 'utf8');
$sql = "select * from blog where id=$id";
$result = mysqli_query($con, $sql);
$blog=mysqli_fetch_assoc($result);
?>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title><?php echo $blog['title']?></title>
    <style>
        h3{
            text-align: center;
        }
        
        
    </style>
</head>
<body>
<div class="container">
    <h3><?php echo $blog['title']?></h3>
    <small><?php echo $blog['create_time']?>
        &nbsp;&nbsp;&nbsp;&nbsp;
    阅读（<?php echo $blog['click']?>）</small>
    <div>
        <?php echo $blog['content']?>
    </div>

</div>
</body>
</html>

